package com.example.gokuplayalong.bases.network.security;


import com.example.gokuplayalong.BuildConfig;
import com.example.gokuplayalong.MainActivity;
import com.example.gokuplayalong.R;

public class MD5Keys {
    private static MD5Keys INSTANCE = null;

    public static MD5Keys getInstance() {
        if (INSTANCE == null) INSTANCE = new MD5Keys();
        return INSTANCE;
    }

    public String getKey() {
        return getKy1() + getKy2() + getKy3() + getKy4();
    }

    protected String getKy1() {
        return BuildConfig.md5Key;
    }

    protected String getKy2() {
        return getKeyK();
    }

    protected String getKy3() {
        return "sklmg";
    }

    protected String getKy4() {
        return MainActivity.getInstance().getString(R.string.md5Key);
    }

    protected String getKeyK() {
        char s = 97;
        for (int i = s; i < 'd'; i++) {
            s++;
        }
        return String.valueOf(s);
    }
}
